﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Skyworth.CRM.Service.Entity;

namespace Skyworth.CRM.Service.IBLL
{
    public interface IWeekLongBLL
    {
        void Add(WeekLong wldm, WeekLongEntry ewldm);

        DataTable GetWeekLongByPage(string strWhere, string strOrderBy, int pageIndex, int pageSize,
                                              out int recordCount, out int pageCount);

        void InsertCredit(Int32 FCreditType, Int32 Fcustid, Int32 Ftype, DateTime FBeginDate, DateTime FEndDate, decimal Famount, Int32 FCreditWay, decimal FYearAmount, Int32 FisYes);
        //void UpdateCredit(Int32 Fitemid, Int32 FCreditType, Int32 Fcustid, Int32 Ftype, DateTime FBeginDate, DateTime FEndDate, decimal Famount, Int32 FCreditWay, decimal FYearAmount, Int32 FisYes);
        DataTable GetCreditByPage(string strWhere, string strOrderBy, int pageIndex, int pageSize,
                                            out int recordCount, out int pageCount);
        DataTable QueryCredit(string strWhere);
        DataTable QueryCash(string strWhere);

        void InsertMoney(Int32 FmoneyType, Int32 Fcustid, DateTime FBeginDate, DateTime FEndDate, decimal Famount, Int32 FisYes, string Fbillno, Int32 Ftype, Int32 Fcashtype);
        //void UpdateMoney(Int32 Fitemid, Int32 FmoneyType, Int32 Fcustid, DateTime FBeginDate, DateTime FEndDate, decimal Famount, Int32 FisYes, string Fbillno, Int32 Ftype, Int32 Fcashtype);

        DataTable GetMoneyByPage(string strWhere, string strOrderBy, int pageIndex, int pageSize,
                                            out int recordCount, out int pageCount);
        DataTable QueryMoney(string strWhere);

        void AddSpecial(Special wldm, SpecialEntry ewldm);
        DataTable GetSpecialByPage(string strWhere, string strOrderBy, int pageIndex, int pageSize,
                                          out int recordCount, out int pageCount);

        void DeleteCredit(int nFitemid, int nFcustid, int nFtype, decimal deFamount);

        void DeleteMoney(int nFitemid, int nFcustid, decimal deFamount);
        DataTable GetCustomerMoneyByPage(string strWhere, string strOrderBy, int pageIndex, int pageSize, out int recordCount, out int pageCount);
        DataTable GetCustomerMoneyItemByPage(string strWhere, string strOrderBy, int pageIndex, int pageSize, out int recordCount, out int pageCount);

        DataTable QueryCustomerMoney(string strWhere);
        void UpdateMoney(int nFitemid, decimal deFCashAmount, decimal deFcreditAmount);

        DataTable GetReceivablesByPage(string strWhere, string strOrderBy, int pageIndex, int pageSize, out int recordCount, out int pageCount);
        void InsertReceivables(Int32 FcustType, Int32 Fcustid, DateTime FReceDate, string Fnode, decimal Famount, Int32 FReceivablesType, string FHuiNumber, Int32 FisYes);
        void DeleteReceivables(int nFitemid, int nFcustid, decimal deFamount);
        void InsertRebate(Int32 FcustType, Int32 Fcustid, DateTime FRebateDate, string Fnode, decimal Famount, Int32 FisYes);

        DataTable GetRebateByPage(string strWhere, string strOrderBy, int pageIndex, int pageSize, out int recordCount, out int pageCount);
        void DeleteRebate(int nFitemid, int nFcustid, decimal deFamount);

    }
}
